<?php
namespace bee;
class afterWhere extends object
{ public $text;
  private $param       = array();
  private $paramType   = array();

  function __construct($text = '', array $params = array(), array $paramTypes = array())
  { $this->text         = $text;
    $this->setParams($params, $paramTypes);
    $this->__withEvents = false;
  }

  function setParam($name, $value, $type = \PDO::PARAM_INT)
  { $this->param[$name] = $value;
    $this->paramType[$name] = $type;
  }
  function setParams(array $params = array(), array $types = array())
  { foreach($params as $key => $value)
    { $this->param[$key] = $value;
      if(isset($types[$key]))
      { $this->paramType[$key] = $types[$key];
      }
    }
  }
  function getParam($name)
  { return isset($this->param[$name])? $this->param[$name] : '';
  }
  function getType($name)
  { return isset($this->paramType[$name]) ? $this->paramType[$name] : \PDO::PARAM_INT;
  }
  function getParams()
  { return $this->param;
  }
}
